1 # IDE - Visual Studio Code with Windows 10
3 ![Visual Studio Code](assets/vscode01.png)
5 [Visual Studio Code](https://code.visualstudio.com/) is probably the best free option for all Windows 10 users. It provides almost seamless integration with WSL running Ubuntu, syntax highlighting, building, and hardware debugging.
9 1. Setup build environment using [generic WSL guide](Building%20in%20Windows%2010%20with%20Linux%20Subsystem.md)
10 1. Download and install [Visual Studio Code](https://code.visualstudio.com/)
11 1. From the VS Code Extensions download [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) plugin
13 1. Use `Ctrl + Shift + P` to run option `Remote-WSL: Reopen Folder in WSL`
14 1. Allow firewall and other permissions if requested
15 1. Install plugins in WSL workspace:
16 1. [C/C++ from Microsoft](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) for C/C++ support
17 1. [Bookmarks](https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks) for simpler navigation
18 1. Configure the environment using the following snippets as a base
22 Edit file `./.vscode/c_cpp_properties.json` to setup enabled `defines`
31 "${workspaceRoot}/src/main/**"
34 "limitSymbolsToIncludedHeaders": false,
39 "intelliSenseMode": "msvc-x64",
41 "cppStandard": "c++17",
48 "USE_GYRO_BIQUAD_RC_FIR2",
52 "USE_ASYNC_GYRO_PROCESSING",
54 "USE_GLOBAL_FUNCTIONS",
55 "USE_DYNAMIC_FILTERS",
58 "USE_I2C_IO_EXPANDER",
70 Edit `./.vscode/tasks.json` to enable Building with `Ctrl + Shift + B` keyboard shortcut and from Command Console.
74 // See https://go.microsoft.com/fwlink/?LinkId=733558
75 // for the documentation about the tasks.json format
79 "label": "Install/Update CMAKE",
81 "command": "mkdir -p build && cd build && cmake ..",
85 "cwd": "${workspaceFolder}"
89 "label": "Compile autogenerated docs",
91 "command": "python3 src/utils/update_cli_docs.py",
94 "cwd": "${workspaceFolder}"
97 // Example of building a single target
99 "label": "Build Matek F722-WPX",
101 "command": "make MATEKF722WPX",
103 "problemMatcher": [],
105 "cwd": "${workspaceFolder}/build"
108 // Example of building multiple targets
110 "label": "Build Matek F405-STD & WING",
112 "command": "make MATEKF405 MATEKF405SE",
114 "problemMatcher": [],
116 "cwd": "${workspaceFolder}/build"